﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CapaPresentacion
{
    public partial class FormPrincipal : Form
    {
        private FormAltaActividades altAct = null;
        private FormAltaUsuario altUsu = null;
        private FormAMBC ambc = null;
        private FormModActividad modAct = null;
        private FormModUsuario modUsu = null;

        public FormPrincipal()
        {
            InitializeComponent();
        }
       

        private void altaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if ((altUsu == null) || (altUsu.IsDisposed == true))
            {
                altUsu = new FormAltaUsuario();
                altUsu.MdiParent = this;
                altUsu.Show();
            }
            else
            {
                altUsu.WindowState = FormWindowState.Maximized;
            }
        }

        private void modificaciónBajaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if ((modUsu == null) || (modUsu.IsDisposed == true))
            {
                modUsu = new FormModUsuario();
                modUsu.MdiParent = this;
                modUsu.Show();
            }
            else
            {
                modUsu.WindowState = FormWindowState.Maximized;
            }
        }

        private void altaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if ((ambc == null) || (ambc.IsDisposed == true))
            {
                ambc = new FormAMBC();
                ambc.MdiParent = this;
                ambc.Show();
            }
            else
            {
                ambc.WindowState = FormWindowState.Maximized;
            }
        }
        private void altaToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if ((altAct == null) || (altAct.IsDisposed == true))
            {
                altAct = new FormAltaActividades();
                altAct.MdiParent = this;
                altAct.Show();
            }
            else
            {
                altAct.WindowState = FormWindowState.Maximized;
            }
        }
        private void modificaciónBajaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if ((modAct == null) || (modAct.IsDisposed == true))
            {
                modAct = new FormModActividad();
                modAct.MdiParent = this;
                modAct.Show();
            }
            else
            {
                modAct.WindowState = FormWindowState.Maximized;
            }
        }

    }
       
}
